<template>
  <view class="container">
    <view class="device"></view>
    <view class="top">
      <view style="display: flex; flex-direction: column; align-items: center; justify-content: center">
        <image src="../../static/mine/applying.png" style="width: 268rpx; height: 204rpx" mode=""></image>
        <view style="font-weight: 500; font-size: 28rpx; color: #222222; margin-top: 12rpx">申请中</view>
      </view>
      <view style="margin-top: 48rpx; margin-left: 26rpx">
        <text style="font-weight: 500; font-size: 28rpx; color: #222222">申请时间</text>
        <text style="font-weight: 500; font-size: 28rpx; color: #222222; padding-left: 26rpx">{{ info.applytime }}</text>
      </view>
    </view>
    <view class="device"></view>
    <view class="content">
      <view class="item">
        <view class="title">绑定手机号</view>
        <view>{{ info.mobile }}</view>
      </view>
      <view class="item">
        <view class="title">工作地点</view>
        <view>{{ info.province + info.citys }}</view>
      </view>
      <view class="item">
        <view class="title">机构信息来源</view>
        <view>{{ info.agency_name }}</view>
      </view>
      <view class="item">
        <view class="title">招募信息来源</view>
        <view>{{ info.sources_name }}</view>
      </view>
      <view class="item">
        <view class="title">获得驾照年份</view>
        <view>{{ info.license_age }}年</view>
      </view>
      <view class="item">
        <view class="title">紧急联系电话</view>
        <view>{{ info.urgent_mobile }}</view>
      </view>
      <!-- 身份证照片 -->
      <view style="font-weight: 500; font-size: 28rpx; color: #222222; margin-bottom: 16rpx">身份证照片</view>
      <view style="display: flex; align-items: center; justify-content: space-evenly">
        <image :src="imgurl + info.identity_just" style="width: 286rpx; height: 164rpx" mode=""></image>
        <image :src="imgurl + info.identity_back" style="width: 286rpx; height: 164rpx" mode=""></image>
      </view>
      <!-- 驾驶证照片 -->
      <view style="font-weight: 500; font-size: 28rpx; color: #222222; margin-bottom: 16rpx">身份证照片</view>
      <view style="display: flex; align-items: center; justify-content: space-evenly">
        <image :src="imgurl + info.license_just" style="width: 286rpx; height: 164rpx" mode=""></image>
        <image :src="imgurl + info.license_back" style="width: 286rpx; height: 164rpx" mode=""></image>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      info: {},
      driverid: ''
    };
  },
  onLoad(opt) {
    if (opt.driverid) {
      this.driverid = opt.driverid;
    }
    this.getuserinfo();
    this.imgurl = this.img;
  },
  methods: {
    // 获取个人信息
    // 获取个人信息
    getuserinfo() {
      this.http('/driver/mydriver', {
        driver_id: this.driverid
      }).then((res) => {
        console.log('个人信息', res);
        this.info = res.data;
        this.info.applytime = dayjs(this.info.createtime * 1000).format('YYYY-MM-DD HH-mm');
        this.info.shenhetime = dayjs(this.info.auditing_time * 1000).format('YYYY-MM-DD HH-mm');
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.container {
  box-sizing: border-box;
  .device {
    box-sizing: border-box;
    width: 750rpx;
    height: 20rpx;
    background: #f8f8f8;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }
  .top {
    width: 100%;
    height: 408rpx;
  }
  .content {
    width: 100%;
    padding: 30rpx 28rpx;
    .item {
      display: flex;
      align-items: center;
      margin-bottom: 24rpx;
      .title {
        width: 200rpx;
        margin-right: 40rpx;
      }
    }
  }
}
</style>
